<?php

if (!isset($_GET['experience']))
	$tabExperience = getExperience();

echo <<< EOPAGE
	<section id="experience" class="content">
		<script type="application/javascript">
			Fk.bind('load', function(){Fk.xp.init();});
		</script>
EOPAGE;
if (isset($tabExperience) && count($tabExperience) > 0)
	foreach ($tabExperience as $experienceArr) {
		$experience = $experienceArr['experience'];
		$expIdExp = $experience->id() . 'Exp';
		$expIdFoldUnfold = $experience->id() . 'FoldUnfold';
		echo <<< EOTASKS
<div class="experienceCell" itemscope itemtype="http://data-vocabulary.org/Organization">
	<span class="year">{$experienceArr['expDates']}</span>
	<h1>{$experience->jobTitle()}</h1>
	<div class="experienceCellShort">
		<img src="{$siteAction->staticPath}img/{$experience->image()}" alt="{$experience->name()}"/>
		<span class="company" itemprop="name">{$experience->name()}</span> - <span class="place" itemprop="locality">{$experience->place()}</span>
EOTASKS;
        if($experience->description() != null && $experience->description() != ''){
            echo <<< EOTASKS
            <br/><br/>
            <span>{$experience->description()}</span>
EOTASKS;
        }
		echo <<< EOTASKS
		<br/>
		<a href="http://{$experience->website()}/" onclick="window.open('http://{$experience->website()}/');return false;" class="website" itemprop="url">{$experience->website()}</a>
	</div>
	<div id="$expIdExp" class="experienceCellMore" style="height:0px;">
		<div class="wrapper">
			<h2>Accomplishments</h2>
			{$experience->accomplishments()}
		</div>
	</div>
	<div id="$expIdFoldUnfold" class="divFoldUnfolder shadowUp">
		<div class="arrow-up" style="display:none;"></div>
		<span class="moreLess">more</span>
		<div class="arrow-down"></div>
	</div>
</div>
EOTASKS;
	}
else
	echo 'no experience';
echo '</section>';
?>